#ifndef __BLOCK_BOX_SPRITE_H__
#define __BLOCK_BOX_SPRITE_H__

#include "ObjManager.h"
#include "cocos2d.h"
#include "Block.h"


struct MapPosStruct
{
	//MapPosStruct(int _x, int _y)
	//{
	//	x = _x; y = _y;
	//}
	int x;
	int y;
};

class BlockBox : public cocos2d::Sprite
{
public:
	virtual bool init();
	CREATE_FUNC(BlockBox);
	void createBlock();
	void removeBlock();

	bool onClickBlockBox(cocos2d::Touch*, cocos2d::Event*);
	int getBlockIdx();
	bool isBlockNull() { return m_block; }
	void setMapPos(MapPosStruct& pos);
	MapPosStruct & getMapPos(){ return m_mapPos; }
	void setDelegage(BlockClickDelegate * del) { m_bcDelegage = del; };
private:
	Block * m_block;
	MapPosStruct m_mapPos;
	BlockClickDelegate * m_bcDelegage;
};

#endif // __BLOCK_BOX_SPRITE_H__
